package cate.common.table.activity.lottery.row;

import cate.common.table.ERow;
import cate.common.table.XSSFRowWrap;
import cate.common.util.random.RWItem;
import easy.java.dev.note.NoteField;

public class LotteryRewardPoolRow extends ERow implements RWItem {
    @NoteField("奖励")
    public String reward;
    @NoteField("权重")
    public double weight;
    @NoteField("奖励池分组")
    public int group;

    @Override
    public void parse(XSSFRowWrap xrw) {
        this.id = xrw.getInteger("ID");
        this.reward = xrw.getString("奖励");
        this.weight = xrw.getDouble("权重",0d);
        this.group = xrw.getInteger("奖励池分组",0);
    }

    @Override
    public double getWeight() {
        return weight;
    }
}
